a = ['a', 'b', 'c', 'd']

print(','.join(a))

print('a' in a)
a = """
""'aaa'""
"""

print(a)
for i in range(10):
    if i % 2 == 0:
        continue
try:
    a = 'xyz'
    print(1/0)
except ZeroDivisionError as e:
    print(e)
except IOError | OSError as e:
    # 合并多个异常
    print(e)
except [EOFError, NameError] as e:
    # 数组类型的多个异常
    print(e)
except Exception as e:
    # 所有异常的父类（但不是顶级父类）
    print(e)
    # 抛出异常，类似throw
    raise e
else:
    print('其他异常')

    # 未知异常，可以使用如下方式进行获取
    import sys
    e = sys.exc_info()
    print(e)
finally:
    print('finally无论是否异常都会执行')

